import itertools
natuals=itertools.count(1)
for n in natuals:
    print(n)
    if n>100:break

j=0    
for i in itertools.cycle('ABCD'):
    j+=1
    print(i)
    if j>100:break
    
for n in itertools.repeat('A',11):
    print(n)

natuals=itertools.count(1)
ns=itertools.takewhile(lambda x : x<=10,natuals)
print(ns)
print(list(ns))

#itertool.chain() ,itertools.groupby()
for c in itertools.chain('abc','abdcdcd'):
    print(c)

for key,group in itertools.groupby('aaaaabbbbbcccff'):
    print(key,list(group))
    
    
